import { createStore,applyMiddleware,compose } from 'redux';//润打可是
import reducer from './reducer';
import thunk from 'redux-thunk';
const composeEnhancers =
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?   
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;

const enhancer = composeEnhancers(
  applyMiddleware(thunk),
);
const store = createStore(reducer, enhancer)


 // 引入工具插件
// const { composeWithDevTools } = require('redux-devtools-extension');
// let store = createStore(reducer,composeWithDevTools());


// let store = createStore(reducer,
//   applyMiddleware(thunk)
//   // ,window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
// );

export default store;